<!--Copyright (C) Kherty.  All rights reserved.-->
<oui:GroupPanel
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    x:Class="OpenLS.Spreadsheet.UI.InsertTabContent"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:oui="http://schemas.Kherty.com/office/2007"
    xmlns:ssui="clr-namespace:OpenLS.Spreadsheet.UI"
    xmlns:chart="http://schemas.Kherty.com/office/2007/chart"
    xmlns:Internals="clr-namespace:OpenLS.Spreadsheet.UI.Internals"
    xmlns:Spreadsheet="clr-namespace:OpenLS.Spreadsheet;assembly=OpenLS.Spreadsheet"
    xmlns:media="clr-namespace:OpenLS.Media;assembly=OpenLS.Media"
    xmlns:Resources="clr-namespace:OpenLS.Spreadsheet.UI.Internals.Resources">
    <oui:GroupPanel.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>

                <ssui:ChartTemplateResources/>
            </ResourceDictionary.MergedDictionaries>
            <Style BasedOn="{StaticResource {x:Type MenuItem}}" TargetType="{x:Type MenuItem}"  x:Key="chartMenuItemStyle">
                <Setter Property="MenuItem.Command" Value="{x:Static ssui:SpreadsheetCommands.InsertChart}"/>
                <Setter Property="CommandParameter" Value="{Binding}"/>
                <Setter Property="Icon" Value="{x:Null}"/>
                <Style.Resources>
                    <Style TargetType="{x:Type Image}">
                        <Setter Property="Width" Value="48"/>
                        <Setter Property="Height" Value="48"/>
                    </Style>
                </Style.Resources>
            </Style>

        </ResourceDictionary>
            
        </oui:GroupPanel.Resources>

    <oui:Group Header="{x:Static Resources:UIStringTable.LoginManager}">
        <Menu>
            <MenuItem Command="{x:Static ssui:SpreadsheetCommands.Login}" CommandParameter="{x:Static Spreadsheet:TableStyles.Medium9}" Header="{x:Static Resources:UIStringTable.Login}" />
        </Menu>
        <MenuItem Command="{x:Static ssui:SpreadsheetCommands.Register}" CommandParameter="{x:Static Spreadsheet:TableStyles.Medium9}" Header="{x:Static Resources:UIStringTable.Register}" oui:RibbonElement.ControlState="Large"/>
    </oui:Group>

    <oui:Group Header="{x:Static Resources:UIStringTable.TableManager}">
            <Menu>
                <MenuItem Command="{x:Static ssui:SpreadsheetCommands.FormatAsTable}" CommandParameter="{x:Static Spreadsheet:TableStyles.Medium9}" Header="{x:Static Resources:UIStringTable.DefineBigDataTable}" />
            </Menu>
            <MenuItem Command="{x:Static ssui:SpreadsheetCommands.BigDataTableManager}" CommandParameter="{x:Static Spreadsheet:TableStyles.Medium9}" Header="{x:Static Resources:UIStringTable.BigDataTableManager}" oui:RibbonElement.ControlState="Large"/>
        </oui:Group>
    
    
    <!--
        <oui:Group Header="{x:Static Internals:UIStringTable.Illustrations}">
            <Menu>
                <MenuItem Command="{x:Static ssui:SpreadsheetCommands.InsertPicture}"/>
            </Menu>
        </oui:Group>
       
        <oui:Group Header ="{x:Static Internals:UIStringTable.Charts}">
            <Menu>
                <Menu.Resources>
                    <Style TargetType="{x:Type Image}">
                        <Setter Property="Width" Value="32"/>
                        <Setter Property="Height" Value="32"/>
                    </Style>
                    <CollectionViewSource x:Key="Columns" Source="{Binding Source={x:Static ssui:ChartTemplates.ColumnTemplates}}">
                        <CollectionViewSource.GroupDescriptions>
                            <chart:ChartTemplateGrouping/>
                        </CollectionViewSource.GroupDescriptions>
                    </CollectionViewSource>
                    <CollectionViewSource x:Key="Lines" Source="{Binding Source={x:Static ssui:ChartTemplates.LineTemplates}}">
                        <CollectionViewSource.GroupDescriptions>
                            <chart:ChartTemplateGrouping/>
                        </CollectionViewSource.GroupDescriptions>
                    </CollectionViewSource>
                    <CollectionViewSource x:Key="Bars" Source="{Binding Source={x:Static ssui:ChartTemplates.BarTemplates}}">
                        <CollectionViewSource.GroupDescriptions>
                            <chart:ChartTemplateGrouping/>
                        </CollectionViewSource.GroupDescriptions>
                    </CollectionViewSource>
                    <CollectionViewSource x:Key="Areas" Source="{Binding Source={x:Static ssui:ChartTemplates.AreaTemplates}}">
                        <CollectionViewSource.GroupDescriptions>
                            <chart:ChartTemplateGrouping/>
                        </CollectionViewSource.GroupDescriptions>
                    </CollectionViewSource>
                    <CollectionViewSource x:Key="Pies" Source="{Binding Source={x:Static ssui:ChartTemplates.PieTemplates}}">
                        <CollectionViewSource.GroupDescriptions>
                            <chart:ChartTemplateGrouping/>
                        </CollectionViewSource.GroupDescriptions>
                    </CollectionViewSource>
                    <CollectionViewSource x:Key="Scatters" Source="{Binding Source={x:Static ssui:ChartTemplates.ScatterTemplates}}">
                        <CollectionViewSource.GroupDescriptions>
                            <chart:ChartTemplateGrouping/>
                        </CollectionViewSource.GroupDescriptions>
                    </CollectionViewSource>
                    <Style TargetType="{x:Type MenuItem}" x:Key="menuItemStyle" BasedOn="{StaticResource {x:Type MenuItem}}">
                        <Setter Property="ItemsPanel">
                            <Setter.Value>
                                <ItemsPanelTemplate>
                                    <WrapPanel MaxWidth ="350"/>
                                </ItemsPanelTemplate>
                            </Setter.Value>
                        </Setter>
                        <Setter Property="ItemContainerStyle" Value="{StaticResource chartMenuItemStyle}"/>
                    </Style>
                    <GroupStyle HidesIfEmpty="False" x:Key="groupStyle">
                        <GroupStyle.HeaderTemplate>
                            <HierarchicalDataTemplate DataType="{x:Type CollectionViewGroup}">
                                <Border BorderThickness="0 0 0 1" BorderBrush="#FFC5C5C5">
                                    <TextBlock Text="{Binding Name}" Background="#FFDDE7EE" FontWeight="Bold"/>
                                    </Border>
                            </HierarchicalDataTemplate>
                        </GroupStyle.HeaderTemplate>
                    </GroupStyle>

                </Menu.Resources>
                <MenuItem Header="{x:Static Internals:UIStringTable.Column}" Style="{StaticResource menuItemStyle}" 
                          ItemsSource="{Binding Source={StaticResource Columns}}" Icon="{media:Image ChartColumn}" >
                    <MenuItem.GroupStyle>
                        <GroupStyle HidesIfEmpty="False">
                            <GroupStyle.HeaderTemplate>
                                <HierarchicalDataTemplate DataType="{x:Type CollectionViewGroup}">
                                    <Border BorderThickness="0 0 0 1" BorderBrush="#FFC5C5C5">
                                        <TextBlock Text="{Binding Name}" Background="#FFDDE7EE" FontWeight="Bold"/>
                                    </Border>
                                </HierarchicalDataTemplate>
                            </GroupStyle.HeaderTemplate>
                        </GroupStyle>
                    </MenuItem.GroupStyle>
                </MenuItem>
                <MenuItem Header="{x:Static Internals:UIStringTable.Line}" Style="{StaticResource menuItemStyle}"
                          ItemsSource="{Binding Source={StaticResource Lines}}" Icon="{media:Image ChartLine}" >
                    <MenuItem.ItemsPanel>
                                <ItemsPanelTemplate>
                                    <WrapPanel MaxWidth ="300"/>
                                </ItemsPanelTemplate>
                    </MenuItem.ItemsPanel>
                    <MenuItem.GroupStyle>
                        <GroupStyle HidesIfEmpty="False" >
                            <GroupStyle.HeaderTemplate>
                                <HierarchicalDataTemplate DataType="{x:Type CollectionViewGroup}">
                                    <Border BorderThickness="0 0 0 1" BorderBrush="#FFC5C5C5">
                                        <TextBlock Text="{Binding Name}" Background="#FFDDE7EE" FontWeight="Bold"/>
                                    </Border>
                                </HierarchicalDataTemplate>
                            </GroupStyle.HeaderTemplate>
                        </GroupStyle>
                    </MenuItem.GroupStyle>
                </MenuItem>

                <MenuItem Header="{x:Static Internals:UIStringTable.Pie}" Style="{StaticResource menuItemStyle}" 
                          ItemsSource="{Binding Source={StaticResource Pies}}" Icon="{media:Image ChartPie}" >
                    <MenuItem.GroupStyle>
                        <GroupStyle HidesIfEmpty="False">
                            <GroupStyle.HeaderTemplate>
                                <HierarchicalDataTemplate DataType="{x:Type CollectionViewGroup}">
                                    <Border BorderThickness="0 0 0 1" BorderBrush="#FFC5C5C5">
                                        <TextBlock Text="{Binding Name}" Background="#FFDDE7EE" FontWeight="Bold"/>
                                    </Border>
                                </HierarchicalDataTemplate>
                            </GroupStyle.HeaderTemplate>
                        </GroupStyle>
                    </MenuItem.GroupStyle>
                </MenuItem>
                
                

                <MenuItem Header="{x:Static Internals:UIStringTable.Bar}" Style="{StaticResource menuItemStyle}"
                          ItemsSource="{Binding Source={StaticResource Bars}}" Icon="{media:Image ChartBar}" >
                    <MenuItem.GroupStyle>
                        <GroupStyle HidesIfEmpty="False" >
                            <GroupStyle.HeaderTemplate>
                                <HierarchicalDataTemplate DataType="{x:Type CollectionViewGroup}">
                                    <Border BorderThickness="0 0 0 1" BorderBrush="#FFC5C5C5">
                                        <TextBlock Text="{Binding Name}" Background="#FFDDE7EE" FontWeight="Bold"/>
                                    </Border>
                                </HierarchicalDataTemplate>
                            </GroupStyle.HeaderTemplate>
                        </GroupStyle>
                    </MenuItem.GroupStyle>
                </MenuItem>


                <MenuItem Header="{x:Static Internals:UIStringTable.Area}" Style="{StaticResource menuItemStyle}"
                          ItemsSource="{Binding Source={StaticResource Areas}}" Icon="{media:Image ChartArea}" >
                    <MenuItem.GroupStyle>
                        <GroupStyle HidesIfEmpty="False" >
                            <GroupStyle.HeaderTemplate>
                                <HierarchicalDataTemplate DataType="{x:Type CollectionViewGroup}">
                                    <Border BorderThickness="0 0 0 1" BorderBrush="#FFC5C5C5">
                                        <TextBlock Text="{Binding Name}" Background="#FFDDE7EE" FontWeight="Bold"/>
                                    </Border>
                                </HierarchicalDataTemplate>
                            </GroupStyle.HeaderTemplate>
                        </GroupStyle>
                    </MenuItem.GroupStyle>
                </MenuItem>
                <MenuItem Header="{x:Static Internals:UIStringTable.Scatter}" Style="{StaticResource menuItemStyle}"
                          ItemsSource="{Binding Source={StaticResource Scatters}}" Icon="{media:Image ChartScatter}" >
                    <MenuItem.GroupStyle>
                        <GroupStyle HidesIfEmpty="False" >
                            <GroupStyle.HeaderTemplate>
                                <HierarchicalDataTemplate DataType="{x:Type CollectionViewGroup}">
                                    <Border BorderThickness="0 0 0 1" BorderBrush="#FFC5C5C5">
                                        <TextBlock Text="{Binding Name}" Background="#FFDDE7EE" FontWeight="Bold"/>
                                    </Border>
                                </HierarchicalDataTemplate>
                            </GroupStyle.HeaderTemplate>
                        </GroupStyle>
                    </MenuItem.GroupStyle>
                </MenuItem>






            </Menu>
        </oui:Group>
        -->
    </oui:GroupPanel>
